Optimal. Leaf size=75 \[ -\frac{2 f (e+f x) \sin (c+d x)}{a d^2}-\frac{2 f^2 \cos (c+d x)}{a d^3}+\frac{(e+f x)^2 \cos (c+d x)}{a d}+\frac{(e+f x)^3}{3 a f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.114828, antiderivative size = 75, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {4523, 32, 3296, 2638} \[ -\frac{2 f (e+f x) \sin (c+d x)}{a d^2}-\frac{2 f^2 \cos (c+d x)}{a d^3}+\frac{(e+f x)^2 \cos (c+d x)}{a d}+\frac{(e+f x)^3}{3 a f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4523
Rule 32
Rule 3296
Rule 2638
Rubi steps
\begin{align*} \int \frac{(e+f x)^2 \cos ^2(c+d x)}{a+a \sin (c+d x)} \, dx &=\frac{\int (e+f x)^2 \, dx}{a}-\frac{\int (e+f x)^2 \sin (c+d x) \, dx}{a}\\ &=\frac{(e+f x)^3}{3 a f}+\frac{(e+f x)^2 \cos (c+d x)}{a d}-\frac{(2 f) \int (e+f x) \cos (c+d x) \, dx}{a d}\\ &=\frac{(e+f x)^3}{3 a f}+\frac{(e+f x)^2 \cos (c+d x)}{a d}-\frac{2 f (e+f x) \sin (c+d x)}{a d^2}+\frac{\left (2 f^2\right ) \int \sin (c+d x) \, dx}{a d^2}\\ &=\frac{(e+f x)^3}{3 a f}-\frac{2 f^2 \cos (c+d x)}{a d^3}+\frac{(e+f x)^2 \cos (c+d x)}{a d}-\frac{2 f (e+f x) \sin (c+d x)}{a d^2}\\ \end{align*}
Mathematica [A] time = 0.423374, size = 74, normalized size = 0.99 \[ \frac{3 \cos (c+d x) \left (d^2 (e+f x)^2-2 f^2\right )-6 d f (e+f x) \sin (c+d x)+d^3 x \left (3 e^2+3 e f x+f^2 x^2\right )}{3 a d^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.059, size = 215, normalized size = 2.9 \begin{align*} -{\frac{1}{a{d}^{3}} \left ({f}^{2} \left ( - \left ( dx+c \right ) ^{2}\cos \left ( dx+c \right ) +2\,\cos \left ( dx+c \right ) +2\, \left ( dx+c \right ) \sin \left ( dx+c \right ) \right ) -2\,c{f}^{2} \left ( \sin \left ( dx+c \right ) - \left ( dx+c \right ) \cos \left ( dx+c \right ) \right ) +2\,def \left ( \sin \left ( dx+c \right ) - \left ( dx+c \right ) \cos \left ( dx+c \right ) \right ) -{c}^{2}{f}^{2}\cos \left ( dx+c \right ) +2\,cdef\cos \left ( dx+c \right ) -{d}^{2}{e}^{2}\cos \left ( dx+c \right ) -{\frac{{f}^{2} \left ( dx+c \right ) ^{3}}{3}}+c{f}^{2} \left ( dx+c \right ) ^{2}-def \left ( dx+c \right ) ^{2}-{c}^{2}{f}^{2} \left ( dx+c \right ) +2\,cdef \left ( dx+c \right ) -{d}^{2}{e}^{2} \left ( dx+c \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.56341, size = 417, normalized size = 5.56 \begin{align*} \frac{6 \, c^{2} f^{2}{\left (\frac{1}{a d^{2} + \frac{a d^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}} + \frac{\arctan \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a d^{2}}\right )} - 12 \, c e f{\left (\frac{1}{a d + \frac{a d \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}} + \frac{\arctan \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a d}\right )} + 6 \, e^{2}{\left (\frac{\arctan \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac{1}{a + \frac{a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}\right )} + \frac{3 \,{\left ({\left (d x + c\right )}^{2} + 2 \,{\left (d x + c\right )} \cos \left (d x + c\right ) - 2 \, \sin \left (d x + c\right )\right )} e f}{a d} - \frac{3 \,{\left ({\left (d x + c\right )}^{2} + 2 \,{\left (d x + c\right )} \cos \left (d x + c\right ) - 2 \, \sin \left (d x + c\right )\right )} c f^{2}}{a d^{2}} + \frac{{\left ({\left (d x + c\right )}^{3} + 3 \,{\left ({\left (d x + c\right )}^{2} - 2\right )} \cos \left (d x + c\right ) - 6 \,{\left (d x + c\right )} \sin \left (d x + c\right )\right )} f^{2}}{a d^{2}}}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.75602, size = 209, normalized size = 2.79 \begin{align*} \frac{d^{3} f^{2} x^{3} + 3 \, d^{3} e f x^{2} + 3 \, d^{3} e^{2} x + 3 \,{\left (d^{2} f^{2} x^{2} + 2 \, d^{2} e f x + d^{2} e^{2} - 2 \, f^{2}\right )} \cos \left (d x + c\right ) - 6 \,{\left (d f^{2} x + d e f\right )} \sin \left (d x + c\right )}{3 \, a d^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 8.52252, size = 770, normalized size = 10.27 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]